use WWW::Mechanize;
use HTTP::Request::Common qw(POST);
use HTTP::Cookies;
use URI::Escape;
use LWP::UserAgent;

$| = 1;

my $mech = WWW::Mechanize->new();
my $browser = LWP::UserAgent->new();

my $cookie_jar = HTTP::Cookies->new(
        file => "D:\\shareonlinebiz.dat",
        autosave => 1,
    );
		
$mech->cookie_jar($cookie_jar);
$browser->cookie_jar($cookie_jar);

$mech->get("http://www.share-online.biz/index.php");

if($mech->content =~ /folder_autologin/)
{
	$mech->form_number(1);
	$mech->field("act" => $mech->value("act",1));
	$mech->field("location" => $mech->value("location",1));
	$mech->field("dieseid" => $mech->value("dieseid",1));
	$mech->field("user" => "MrMirror");
	$mech->field("pass" => "egglistcool");
	$mech->field("folder_autologin" => "1");
	$mech->submit();

	$mech->get("http://www.share-online.biz/index.php");
}

$mech->form_number(1);
my $response = HTTP::Request->new(POST => "http://dl9-2.share-online.biz/uploading.php");
$response->content("sessionid=".$mech->value("sessionid",1).";UploadSession=".$mech->value("UploadSession",1).";AccessKey=".$mech->value("AccessKey",1).";maxfilesize=".$mech->value("maxfilesize",1).";phpuploadscript=".$mech->value("phpuploadscript",1).";returnurl=".$mech->value("returnurl",1).";uploadmode=3;uploadftp[0]=".uri_escape("ftp://chrille79:bowling1@91.121.133.211/Upload/aktuell/1.Mai.Helden.bei.der.Arbeit.German.DVDRiP.XviD-EMPiRE.part2.rar"));

$html = $browser->request($response)->as_string;

print $html;